package com.blog.util;


public class StrUtils extends org.apache.commons.lang3.StringUtils {


    /**
     * 获得一个数组， 取得字符串前部分和后部分
     * 如 source = 111000222 , firstIndex=3, lastIndex=6。
     * 结果 ["111","222"]
     * @param source
     * @param firstIndex
     * @param lastIndex
     * @return
     */
    public static String[] getFirstAndLastArr(String source, int firstIndex, int lastIndex) {
        String[] strs = new String[2];
        strs[0] = source.substring(0, firstIndex);
        strs[1] = source.substring(lastIndex);
        return strs;
    }

}
